package com.ldu.houserent.service.impl;

import com.ldu.houserent.mapper.ChartsMapper;
import com.ldu.houserent.service.ChartsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 数据可视化service实现类
 */
@Service
@Transactional
public class ChartsServiceImpl implements ChartsService {

    @Resource
    private ChartsMapper chartsMapper;

    /*
        查询每个城市房屋的数量
     */
    @Override
    public List<Map> findHouseNumByCity() {
        return chartsMapper.findHouseNumByCity();
    }

    /*
        查询每种出租类型房屋的数量
     */
    @Override
    public List<Map> findHouseNumByRentType() {
        return chartsMapper.findHouseNumByRentType();
    }
}
